]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Add a 'Show Details' menuitem in the app picker
authorMatthias Clasen <mclasen@redhat.com>
Sat, 2 Nov 2013 19:36:34 +0000 (15:36 -0400)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 30 Apr 2014 17:15:06 +0000 (19:15 +0200)
Add a menu item that shows the details of the application
in gnome-software.

https://bugzilla.gnome.org/show_bug.cgi?id=643043

js/ui/appDisplay.js

index e04c59ac1a746c68d016a0f47746dd2b60f21a37..e43a67938439a2e64410cf43b03c03254553dd26 100644 (file)
@@ -1602,6 +1602,26 @@ const AppIconMenu = new Lang.Class({
                     favs.addFavorite(this._source.app.get_id());
                 }));
             }
+
+            if (Shell.AppSystem.get_default().lookup_app('org.gnome.Software.desktop')) {
+                this._appendSeparator();
+                let item = this._appendMenuItem(_("Show Details"));
+                item.connect('activate', Lang.bind(this, function() {
+                    let id = this._source.app.get_id();
+                    let args = GLib.Variant.new('(ss)', [id, '']);
+                    Gio.DBus.get(Gio.BusType.SESSION, null,
+                        function(o, res) {
+                            let bus = Gio.DBus.get_finish(res);
+                            bus.call('org.gnome.Software',
+                                     '/org/gnome/Software',
+                                     'org.gtk.Actions', 'Activate',
+                                     GLib.Variant.new('(sava{sv})',
+                                                      ['details', [args], null]),
+                                     null, 0, -1, null, null);
+                            Main.overview.hide();
+                        });
+                }));
+            }
         }
     },